package com.fengxing.ams.web.facade.mouble.account;

import java.util.Date;
import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

public interface IDayAccountDAO extends PagingAndSortingRepository<DayAccount, Integer>, JpaSpecificationExecutor<DayAccount>  {

	List<DayAccount> findByVipId(String id);

	List<DayAccount> findByPhone(String id);

	List<DayAccount> findByCarNumber(String id);

	@Query("select  t from DayAccount t where t.recordTime > :startTime and t.recordTime < :endTime order by t.recordTime")
	List<DayAccount> queryByTime(@Param("startTime")Date startTime, @Param("endTime")Date endTime);

	
	@Query("select  t from DayAccount t where t.recordTime > :startTime and t.recordTime < :endTime and t.accountName='洗车' order by t.recordTime")
	List<DayAccount> queryTimes(@Param("startTime")Date startTime, @Param("endTime")Date endTime);
}
